package com.orange.learnspringbootmail.controller;

import com.orange.learnspringbootmail.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("mail")
public class MailController {

    @Autowired
    private MailService mailService;

    @GetMapping("send")
    public String SendMail() {
        mailService.sendMail();
        return "邮件发送成功";
    }
}
